package com.tjtt.tdm.system.service.impl;

import java.util.List;
import java.util.Map;

import com.tjtt.tdm.base.PageResult;
import com.tjtt.tdm.system.bean.TdmMessage;
import com.tjtt.tdm.system.dao.IMessageDao;
import com.tjtt.tdm.system.service.IMessageService;

/**
 * @author Administrator
 *
 */
public class MessageServiceImpl implements IMessageService{
	private IMessageDao messageDao;

	public IMessageDao getMessageDao() {
		return messageDao;
	}

	public void setMessageDao(IMessageDao messageDao) {
		this.messageDao = messageDao;
	}

	
	public void deleteMessage(String ids) {
		messageDao.deleteMessage(ids);
	}

	
	public TdmMessage getOneMessage(String id) {
		return messageDao.getOneMessage(id);
	}

	
	public PageResult queryMessage(Map filterMap) {
		return messageDao.queryMessage(filterMap);
	}
	
	
	public PageResult queryGonggao(Map filterMap) {
		return messageDao.queryGonggao(filterMap);
	}

	
	public String saveMessage(TdmMessage message) {
		return messageDao.saveMessage(message);
	}

	
	public String updateMessage(TdmMessage message) {
		return messageDao.updateMessage(message);
	}

	
	public String updateMessageUser(String userid, String msgid) {
		return messageDao.updateMessageUser(userid, msgid);
	}

	
	public int receiveMessageCount(String userid) {
		return this.messageDao.receiveMessageCount(userid);
	}

	
	public int toDoThingCount(String userid,String role) {
		return this.messageDao.toDoThingCount(userid,role);
	}

	//首页显示站内信息
	public List findMessage(Map filterMap) {
		List list = messageDao.findMessage(filterMap);
		return list;
	}

	//系统公告
	public List findGonggao(Map filterMap) {
		List list = messageDao.findGonggao(filterMap);
		return list;
	}
	
	
	public List findDaiBanList(Map filterMap) {
		List list = messageDao.findDaiBanList(filterMap);
		return list;
	}

	
	public int getUnreadMessageCount(String userid) {
		// TODO Auto-generated method stub
		return messageDao.getUnreadMessageCount(userid);
	}
	
	
	public int getSheBeiCount(String orgid,String userId) {
		return messageDao.getSheBeiCount(orgid,userId);
	}
	
	
	public List getCerifyName() {
		return messageDao.getCerifyName();
	}
}
